package com.ruoyi.eqmonitor.controller;


import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.eqmonitor.service.OptDeviceRealTimeDataService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 设备监测实时数据
 * ---接口注释规则---
 * （设备名称）-（监测数据类型）+（监测数据类型）+....
 */
@Api("设备监测实时数据")
@RestController
@RequestMapping("/data")
public class OptDeviceRealTimeDataController {

    @Resource
    private OptDeviceRealTimeDataService optDeviceRealTimeDataService;

    /**
     * 氨氮一体机-氨氮+流量+液位
     */
    @ApiOperation("氨氮一体机-氨氮+流量+液位")
    @GetMapping(value = "/selectAnDanLiuLiang")
    public AjaxResult selectAnDanLiuLiang() {
        return AjaxResult.success(optDeviceRealTimeDataService.selectAnDanLiuLiang());
    }

    /**
     * 一杆式河道监测站-流量+液位+雨量
     */
    @ApiOperation("一杆式河道监测站-流量+液位+雨量")
    @GetMapping(value = "/selectRiverway")
    public AjaxResult selectRiverway() {
        return AjaxResult.success(optDeviceRealTimeDataService.selectRiverway());
    }

    /**
     * 一杆式河道监测站-雨量
     */
    @ApiOperation("一杆式河道监测站-雨量")
    @GetMapping(value = "/selectRiverwayY")
    public AjaxResult selectRiverwayY() {
        return AjaxResult.success(optDeviceRealTimeDataService.selectRiverwayY());
    }

    /**
     * 原位水质监测仪-液位+流量
     */
    @ApiOperation("原位水质监测仪-液位+流量")
    @GetMapping("/selectWaterQuality")
    public AjaxResult selectWaterQuality() {
        return AjaxResult.success(optDeviceRealTimeDataService.selectWaterQuality());
    }

    /**
     * 窨井液位监测仪-液位
     */
    @ApiOperation("窨井液位监测仪-液位")
    @GetMapping("/selectManhole")
    public AjaxResult selectManhole() {
        return AjaxResult.success(optDeviceRealTimeDataService.selectManhole());
    }

}
